/**
* Protocol.java 2020/5/8 8:15 下午
* Copyright ©2020 www.bmsoft.com.cn All rights reserved.
* PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package protocol;

import common.exception.MagicRpcException;
import common.model.Exporter;
import common.model.Invoker;
import common.model.MagicUrl;
import java.util.Collection;
import remoting.exchange.ExchangeServer;

/**
 * File：Protocol.java<br>
 * Title: <br>
 * Description: <br>
 * Company: www.treefinance.com.cn <br>
 * @author heyouchi
 * Date: 2020/5/8
 */
public interface Protocol {

  int getDefaultPort();

  <T> Exporter<T> export(Invoker<T> invoker) throws MagicRpcException;

  <T> Invoker<T> refer(Class<T> type, MagicUrl url) throws MagicRpcException;

  void destroy();

  Collection<ExchangeServer> getServers();
}
